//获取应用实例
const app = getApp()
const http = require('../../utils/http.js')
const util = require('../../utils/util.js')

Page({
    data: {
        PageCur: 'home',
        menuList: []
    },

    NavChange(e) {
        this.setData({
            PageCur: e.currentTarget.dataset.cur
        })
    },

    onLoad: function (options) {
        console.log(util.formatTime(new Date()))
        if (options.pageCur) {
            this.setData({
                PageCur: options.pageCur
            })
        }
        http.get('/api/index/selectAllMiniMenu').then(res => {
            this.setData({
                menuList: res.data
            })
        })
    },
    //分享
    onShareAppMessage(res) {
        //console.log(this.data.coupon.stockId)
    }
})
